﻿@using ORM.Models
@model ORM.Areas.Admin.ViewModels.ManageUsers.UserDetailsViewModel
@Html.ValidationSummary(true, ValidationMessages.Summary)
<div class="content-box">
    <div class="content-box-header">
        <h3>
            User information</h3>
    </div> 
    <div class="content-box-content">
        @{
            @Html.HiddenFor(m => m.User.Id)
            <div class="input">
                <div class="cell label">
                    Username</div>
                <div class="cell">@Model.User.Username</div>
                <div class="clear">
                </div>
                <div class="cell label">
                    Email</div>
                <div class="cell">
                    @Model.User.Email</div>
                <div class="clear">
                </div>
                <div class="cell label">
                    Point</div>
                <div class="cell">@Model.User.Ponit</div>
                <div class="clear">
                </div>
                <div class="clear">
                </div>
                <div class="cell label">
                    Roles</div>
                <div class="cell">@Model.RolesSummary</div>
                <div class="clear">
                </div>
                <div class="cell label">
                    Last Logged In</div>
                <div class="cell">@string.Format("{0:dd/MM/yyyy HH:mm}", Model.User.LastLogin)</div>
                <div class="clear">
                </div>
                <div class="cell label">
                    Registed Date</div>
                <div class="cell">@string.Format("{0:dd/MM/yyyy HH:mm}", Model.User.CreatedDate)</div>
                <div class="clear">
                </div>
            </div>
            <br />
        }
        @Html.Partial("_EditButton", new ORM.Models.ActionInfo("Edit", "Edit") { Id = @Model.User.Id })
        @Html.Partial("_DeleteButton", new ORM.Models.ActionInfo("Delete", "Delete") { Id = @Model.User.Id })
        @Html.Partial("_BackButton", new ORM.Models.ActionInfo("Back", "Index") { Id = @Model.User.Id })
    </div>
</div>
@Html.Telerik().ScriptRegistrar().jQuery(false)
<script type="text/javascript">
    $(document).ready(function () {
        $(".t-grid-delete").click(function (e) {
            if (!confirm("Are you sure you want to delete this user?")) {
                return false;
            }
        });
    });
</script>
